package com.woniuxy.woniuticket.movieinfomodule.controller;

import com.github.pagehelper.PageInfo;

import com.woniuxy.woniuticket.movieinfomodule.pojo.UsersInfoLc;
import com.woniuxy.woniuticket.movieinfomodule.service.UserService;
import com.woniuxy.woniuticket.movieinfomodule.vo.UserVO;
import com.woniuxy.woniuticket.pojo.UsersInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 用户查询
 * 卢川
 */
@RestController
@RequestMapping("/cinema")
public class ManagerUserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/queryUserInfo1")
    public Map queryUserInfo1(@RequestParam(value = "page",defaultValue = "1",required = false) Integer currentpage,
                             @RequestParam(value = "limit",defaultValue = "10",required = false) Integer pagesize, UserVO vo){
        List<UsersInfoLc> list=userService.queryUserInfoserInfo(currentpage,pagesize,vo);
        Map map=new HashMap();
        map.put("code",0);
        map.put("msg","");
        map.put("count",list.size());
        map.put("data",list);
        return map;
    }
}
